/// Http请求结果实体，一般与后台约定，符合restful风格
class ResultData extends Object{
  // 成功
  static const int SUCCESS = 0;

  String msg;
  int code;
//  var data;

  ResultData(this.msg, this.code);

  ResultData.fromJson(Map<String, dynamic> json) {
    this.msg = json['msg'];
    this.code = json['code'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['msg'] = this.msg;
    data['code'] = this.code;
    return data;
  }

  bool get isSuccess => this.code == SUCCESS;
}
